@extends('Admin.layouts.common')

@section('content')
    <div class="container myContainer">

        <div id="order_tag"></div>

        <div class="table-responsive">
            
            <table class="table">
                <caption>详细</caption>
                
                <tbody>
                    
                        <tr>
                            <td>今日新增</td>
                            <td>{{ $day_info->added_count??0 }}</td>
                        </tr>
                        <tr>
                            <td>今日活跃用户量</td>
                            <td>{{ $day_info->active_count??0 }}</td>
                        </tr>
                        <tr>
                            <td>今日到账新增补贴</td>
                            <td>{{ $day_info->subsidy_coin??'0.00' }}</td>
                        </tr>
                        <tr>
                            <td>今日预估分成收益</td>
                            <td>{{ $day_info->divide_into_coin??'0.00' }}</td>
                        </tr>
                        <tr>
                            <td>昨日新增</td>
                            <td>{{ $yestoday->added_count??0 }}</td>
                        </tr>
                        <tr>
                            <td>昨日活跃用户量</td>
                            <td>{{ $yestoday->active_count??0 }}</td>
                        </tr>
                        <tr>
                            <td>昨日到账新增补贴</td>
                            <td>{{ $yestoday->subsidy_coin??'0.00' }}</td>
                        </tr>
                        <tr>
                            <td>昨日预估分成收益</td>
                            <td>{{ $yestoday->divide_into_coin??'0.00' }}</td>
                        </tr>
                        <tr>
                            <td>累计收益</td>
                            <td>{{ $user->total_money??'0.00' }}</td>
                        </tr>
                        <tr>
                            <td>当月预估收益</td>
                            <td>{{ $data->this_month??'0.00' }}</td>
                        </tr>
                        <tr>
                            <td>上月预估收益</td>
                            <td>{{ $data->last_month??'0.00' }}</td>
                        </tr>
                        
     
                </tbody>
            </table>
            <div class="text-center">
                
            </div>
        </div>

    </div>
    <link href="{{ asset('libs/select2/select2.min.css') }}" rel="stylesheet">
<script src="{{ asset('libs/select2/select2.min.js') }}"></script>
<script src="{{ asset('libs/select2/zh-CN.js') }}"></script>
<script type="text/javascript">
$("#uid").select2({
    language: "zh-CN",
    ajax:{
        url: "/Users/ajax_select2_user",
        dataType: 'json',
        delay: 600,
        method: 'POST',
        data: function (params) {
            return {
                name: params.term,
            };
        },
        processResults: function (data, params) {
            return {
                results: data.data,
            };
        },
        cache: true
    },
    placeholder:'请输入手机号码',
    allowClear: true,
    escapeMarkup: function (markup) { return markup; },
    minimumInputLength: 11,
    templateResult: function(repo){ return repo.name; },
    templateSelection: function(repo){ 
        if(repo.id === ""){
            return repo.text
        }else{
            if(repo.selected == true){
                return repo.text
            }
            return repo.name
        }
         
    } 
});
</script>

<script type="text/javascript">
$.ajaxSetup({
    headers: {
    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    }
})

function ajax_delete_theme(id){
    if(confirm('确认删除吗?')){
        $.post("/admins/ajax_delete_admin/"+id,{},function(json){
            if(json.status==1){
                $("#tr_"+json.data).fadeOut();
            }else{
                alert(json.info);
            }
        },"json");
    } 
}

function up_status(id,status){
    if(confirm("确认执行操作吗?")){
        $.post("/user/ajax_up_status/"+id,{status:status},function(json){
            if(json.status==1){
                window.location.reload();
            }else{
                alert(json.info);
            }
        },"json");
    }
}
function ajax_up_level(id,level){
    if(confirm("确认执行操作吗?")){
        $.post("/user/ajax_up_level/"+id,{level:level},function(json){
            if(json.status==1){
                window.location.reload();
            }else{
                alert(json.info);
            }
        },"json");
    }
}
</script>
@endsection